<?php
include("database.php");

  $idcheck = base64_decode($_POST['donate_id']);
  
  if($_POST==null) {}
    else {
      extract($_POST);

      $update = mysqli_query($con,"UPDATE DonateList SET Help = Help + 1 WHERE ID='$idcheck'") or die (mysql_error());
  
      $query="INSERT into Help (
        donate_id, 
        name, 
        contact, 
        details
      ) VALUES (
      '$idcheck',
      '$_POST[name]',
      '$_POST[contact]',
      '$_POST[details]')";

      if (!mysqli_query($con,$query)) { die('Error: ' . mysqli_error($con)); }
    }

?>